{% extends "analyse/layout.html" %}

{% block title %}ianalyse - Take a closer look at your project{% endblock %}

{% block extrahead %}
<script type="text/javascript" src="{{ MEDIA_URL }}/js/swfobject.js"></script>
<link href="{{ MEDIA_URL }}/css/dashboard.css" media="screen" rel="stylesheet" type="text/css"/>
{% endblock %}
{% block content %}
{% load builds_tag %}

{% group_cmp MEDIA_URL configs group_id %}

<div style="margin-left:500px;margin-top:0.5em;margin-bottom:0.5em">
	<input id="export" type="button" value="Export as Image" style="cursor:pointer"></input>
	Group {%group_selection groups group_id %}
</div>
<script>
$(document).ready(function(){
	$("#group_selection_box").change(function(e){
		var selected = $("#group_selection_box option:selected");   
		window.location = '/analyse/index.html?groups=' + selected.text()
	});	     
	});
</script>

<b id="projects_comparation"></b>
<div id="light_box"></div>
{%export_as_img "#export" "#projects_comparation" "projects_comparation.png"%}

<div id="preview_container">
	<ul class="previews">
		{% for item in configs.items %}
			<li class="preview">
				{% if item.1.has_result %}
				  	<b id="total_pass_rate_{{item.0}}"></b>				
					<script type="text/javascript">
					    swfobject.embedSWF(
					            "{{ MEDIA_URL }}/swf/open-flash-chart.swf", "total_pass_rate_{{item.0}}", "120", "120",
					            "9.0.0", "expressInstall.swf",
					    {"data-file":"/results/{{item.0}}/overall_pass_rate.txt"}
					            );
					</script>

				{% else %}
					<span class="miss_data">
						Missing Data 
						<a href="/analyse/setup.html?id={{item.0}}">Reslove it NOW!</a>
					</span>
				{% endif %}
				<div>
					{% more_attention_icon project_groups item.0 %}
					{% build_status_icon project_groups item.0 %}
				</div>
				<a class="name " href="/analyse/show.html?id={{item.0}}">{{item.0}}</a>
			</li>
		{% endfor %}
	</ul>
</div>
{% endblock %}